#!/usr/bin/ruby -w

#  run-tests.rb
#
#  This file is part of myvnet.
#
#  Copyright (C) 2008  Filipe David Borba Manana,  fdmanana@gmail.com
#
#  myvnet is free software: you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation, either version 3 of the License, or
#  (at your option) any later version.
#
#  myvnet is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with myvnet.  If not, see <http://www.gnu.org/licenses/>.


unless Process::Sys.getuid.zero?
  STDERR.puts "[FATAL] The tests must be run by user `root'."
  exit 1
end

$LOAD_PATH.unshift '.'
$LOAD_PATH.pop if $LOAD_PATH[-1] == '.'

require 'tests/protocols/ethernet_test'
require 'tests/protocols/arp_test'
require 'tests/protocols/ipv4_test'
require 'tests/protocols/icmp_test'
require 'tests/protocols/udp_test'
require 'tests/protocols/encapsulation_test'
require 'tests/sniffer_test'
require 'tests/daemon_dispatcher_test'
require 'tests/injector_test'
require 'tests/daemons/arp_daemon_test'
require 'tests/daemons/ping_daemon_test'
require 'tests/daemons/udp_echo_daemon_test'


